<template>
  <div class="box">
    <div class="boxbx" v-for="(v,i) in obj" :key="i">
      <img :src="v.imgsrc" alt="" @click="fun()">
      <p>{{v.title}}</p>
      <p>{{v.title}}</p>
      <p>{{v.text}}</p>
    </div>
    <div class="quanbu">
        <p>查看全部19个商品></p>
      </div>
  </div>
</template>

<script>
// import {Two} from "@/api/yangchao.js"
import axios from "axios"

export default {
   data(){
    return {
        obj:[]
        }
    },
  mounted(){
    axios.request("http://localhost:8889/two")
    .then((ok)=>{
            console.log(ok)
            this.obj=ok.data
        })
  },
  methods:{
    fun(){
      this.$router.push("/yccfour")
    }
  }
  
}
</script>

<style scoped lang="scss">
.box{
  width: 93.333vw;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: auto;
  padding-top: 8vw;
  .quanbu{
    width: 94.667vw;
    height: 24vw;
    line-height: 24vw;
    text-align: center;
    color: #f63;
  }
}
.boxbx{
  border-bottom: 0.267vw solid #999;
  border-left: 0.267vw solid #999;
  border-radius: 2.667vw;
  width: 45.333vw;
  margin-top: 2.667vw;
}
img{
  width: 45.333vw;
  height: 45.333vw;
  border-radius: 2.667vw;

}
</style>